package com.example.springmvc.service;

import com.example.springmvc.Mapper.MessagerInfoMapper;
import com.example.springmvc.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageInfoService {
    @Autowired
    private MessagerInfoMapper messagerInfoMapper;

    public Integer insertMessage(MessageInfo messageInfo) {
        return messagerInfoMapper.insertMessage(messageInfo);

    }

    public List<MessageInfo> queryMessage() {
        return messagerInfoMapper.queryMessage();
    }
}
